;;; init-mini.el --- Centaur Emacs minimal configurations.	-*- lexical-binding: t no-byte-compile: t -*-

;; Copyright (C) 2018-2023

;;
;; Minimal configurations for debugging purpose.
;;

;;; Code:

;; Load path
;;(push (expand-file-name "site-lisp" user-emacs-directory) load-path)
(push (expand-file-name "lisp" user-emacs-directory) load-path)
(push (expand-file-name "lispX" user-emacs-directory) load-path)

;; Load path
;;(add-to-list 'load-path "~/.emacs.d") ; add sort-tab to your load-path
;;(require 'cl-lib)
;;(defun add-subdirs-to-load-path (dir)
;;  "Recursive add directories to `load-path'."
;;  (let ((default-directory (file-name-as-directory dir)))
;;    (add-to-list 'load-path dir)
;;    (normal-top-level-add-subdirs-to-load-path)))
;;(add-subdirs-to-load-path "~/.emacs.d/lisp")



;; UI
(load-theme 'wombat t)


;; (global-hl-line-mode 1)

;; (if (fboundp 'display-line-numbers-mode)
;;     (global-display-line-numbers-mode 1)
;;   (global-linum-mode 1))
(set-frame-parameter nil 'alpha 0.9)

(set-face-attribute 'default nil
                    :family "Sarasa Mono SC Nerd"
                    :height 180
                    )


;;以下这段配置设置，无论在小尺寸笔记本，还是台式电脑；无论在 Windows，还是 iMac， Emacs 的起始窗口比例都是长宽 80% 居中了。
;;https://kimi.im/2019-02-09-emacs-frame-dimention
(if (not (eq window-system nil))
     (progn
      ;; top, left ... must be integer
;;      (add-to-list 'default-frame-alist
       ;;                   (cons 'top  (/ (x-display-pixel-height) 10) ))
      (add-to-list 'default-frame-alist
                   (cons 'left (/ (x-display-pixel-width) 10)))
 ;;                  (cons 'alpha-background . 80)))
      (add-to-list 'default-frame-alist
                   (cons 'height (/ (* 5 (x-display-pixel-height))
                                    (* 5 (frame-char-height)))))
      (add-to-list 'default-frame-alist
                   (cons 'width (/ (* 4 (x-display-pixel-width))
                                   (* 5 (frame-char-width)))))))

(require 'init-elpa)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Init-mini.el ends here
(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(package-selected-packages
   '(delight diminish gnu-elpa-keyring-update use-package list-packages-ext exec-path-from-shell dracula-theme)))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )
